package ru.kest.torrentwatchlist.parsing.nnm;

import ru.kest.torrentwatchlist.entity.DynamicTorrentInfo;
import ru.kest.torrentwatchlist.entity.NnmTorrent;
import ru.kest.torrentwatchlist.web.model.TorrentBean;

/**
 * Created by Konstantin on 09.12.2014.
 */
public class NNMTransformer {

    public void transformNNMTorrent(TorrentBean result, NnmTorrent dbTorrent) {
        DynamicTorrentInfo info = new NNMScraper().parseDynamicInfo(dbTorrent.getUrl());
        if (info != null) {
            result.setSeeders(info.getSeeders());
            result.setLeechers(info.getLeechers());
        }
    }
}
